package com.zlc.common.common.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zlc.common.common.entity.BaseEntity;

import java.util.List;

public interface BaseService<M extends BaseMapper<T>,T extends BaseEntity,V extends BaseEntity> extends IService<T> {

    List<V> queryVoList(LambdaQueryWrapper<T> wrapper);


    V  queryOne(LambdaQueryWrapper<T> wrapper);

    V  queryOne(String id);

    V  saveVo(V vo);

    /**
     * 逻辑删除
     */
    int  deleteById(String id);

    /**
     * 物理删除
     */
    void  deleteObjById(String id);

    /**
     * 物理删除
     */
    void  deleteObjByIds(List<String> ids);

    List<V>  saveVoList(List<V> vos);


    List<V> saveBatchVoList(List<V> vos);

    LambdaQueryWrapper<T> wrapper();
}
